Returns an expression which represents a conditional OR operation of the specified operands.
Syntax
Parameters
- expressions
- Expressions to be OR'ed
Type Parameters
- T
Example
C# | Copy Code |
---|
public void OrQuery2() {
var mgr = new DomainModelEntityManager();
Expression<Func<Customer, bool>> crit1 = c => c.Country.Equals("Mexico");
Expression<Func<Customer, bool>> crit2 = c => c.CompanyName.StartsWith("A");
Expression<Func<Customer, bool>> crit3 = c => c.City.StartsWith("M");
// 'or' all criteria.
var finalcrit = PredicateBuilder.Or(crit1, crit2, crit3);
var results = mgr.Customers.Where(finalcrit).ToList();
} |
Remarks
Requirements
Target Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family
See Also